package phoenix.web.locators.base;

import org.openqa.selenium.By;

/**
 * Class provides base locators on PaymenPage
 */
public abstract class PaymentPageLocatorsBase
{
	// Edit link:
	public By linkChangePaymentDetails = By.xpath("//*[contains(@id,'change_payment_details')]");

	// Navigation link:
	public By linkBackToSite = By.cssSelector(".back");

	// Main block:
	public By blockPaymentSubscription = By.id("subscription");
	public By blockPaymentDetails = By.id("payment_details");
	public By blockPaymentFailedHeder = By.cssSelector(".b-failed-header");
	public By btnSubmit = By.id("btn-pay");
	// Button for FGF
	public By btnGoToSite = null;
	public By btnContinue = null;

	// Package block:
	public By block3DayPackage = By.id("package_3DAY1");
	public By block1MonthPackage = By.id("package_30DAY1");
	public By block3MonthPackage = By.id("package_90DAY1");
	public By block6MonthPackage = By.id("package_180DAY1");

	// Credits block for FGF:
	public By blockCredits20 = null;
	public By blockCredits40 = null;
	public By blockCredits80 = null;
	public By blockCredits160 = null;
	public By blockCredits320 = null;
	public By blockCredits500 = null;
	public By blockCredits1000 = null;

	// Features block:
	public By blockAdditionalFeatures = By.cssSelector(".b-additional-features");
	public By blockFullUpgrade = By.xpath("//*[@class='b-packages']//*[@class='packages-list']//*[@id='package_30DAY5']");
	public By blockSearchUpgrade = By.xpath("//*[@class='b-packages']//*[@class='packages-list']//*[@id='package_30DAY7']");
	public By blockCommunicationUpgrade = By.xpath("//*[@class='b-packages']//*[@class='packages-list']//*[@id='package_30DAY2']");

	// Form details block:
	public By txtCardNumber = By.id("CreditCardPaymentForm_card_number");
	public By txtNameOnCard = By.id("CreditCardPaymentForm_card_holder");
	public By selectExpirationDateMonth = By.id("CreditCardPaymentForm_expiration_date_m");
	public By selectExpirationDateYear = By.id("CreditCardPaymentForm_expiration_date_y");
	public By txtSecurityNumber = By.id("CreditCardPaymentForm_security_number");
	public By txtFirstName = By.id("CreditCardPaymentForm_name_first");
	public By txtLastName = By.id("CreditCardPaymentForm_name_last");
	public By txtBillingAddress = By.id("CreditCardPaymentForm_address");
	public By txtCity = By.id("CreditCardPaymentForm_city");
	public By txtPostcode = By.id("CreditCardPaymentForm_postal_code");
	public By selectCountry = By.id("CreditCardPaymentForm_country_code");

	// Successful pop up
	public By blockPaymentSuccessPopUp = By.cssSelector(".b-popup.b-sms-chat.congratulation");
	public By blockPaymentSuccessPupUpClose = By.id("popupClose");

	// Old locators
	public By blockValidatioList = By.xpath("//*[@id='payment_details']//div[contains(@class,'required') and not(contains(@class,'longOnly'))]");
	public By blockValidationError = By.xpath("//*[@class='b-error']");
	public By blockAmount = By.xpath("//*[@class='amount']");
	public By blockCent = By.xpath("//*[@class='cent']");
	public By blockPrice = By.xpath("//*[@class='price']");
	public By bntPay = By.id("btn-pay");

	// Form authorization block:
	public By txtCardNumberAuthorization = By.id("CardAuthorizationModel_cardNumber");
	public By txtNameOnCardAuthorization = By.id("CardAuthorizationModel_cardHolder");
	public By selectExpirationDateMonthAuthorization = By.id("CardAuthorizationModel_expiration_date_m");
	public By selectExpirationDateYearAuthorization = By.id("CardAuthorizationModel_expiration_date_y");
	public By txtSecurityNumberAuthorization = By.id("CardAuthorizationModel_securityNumber");
	public By btnSubmitAuthorization = By.id("getAccess");

	// Success authorization pop-up
	public By blockSuccessAuthorizationPopup = By.cssSelector(".b-popup.b-x-sale-popup.verification");
	public By bntContinueAuthorizationPopup = By.id("popup-continue");
}
